package net.springmvc19_20.service.impl;

import net.springmvc19_20.entity.Stu;
import net.springmvc19_20.mapper.StuMapper;
import net.springmvc19_20.service.StuService;
import net.springmvc19_20.utils.MybatisUtil;
import org.apache.ibatis.session.SqlSession;
import org.springframework.stereotype.Service;

@Service
public class StuServiceImpl implements StuService {
    @Override
    public Stu login(String name, String sn) {
        SqlSession sqlSession = MybatisUtil.getSqlSession();
        StuMapper mapper = sqlSession.getMapper(StuMapper.class);
        System.out.println("service  "+mapper);
        return mapper.login(name, sn);
    }
}
